import request from '@/utils/request'

// 查询酒店预订列表
export function listBook(query) {
  return request({
    url: '/booking/book/list',
    method: 'get',
    params: query
  })
}

// 查询酒店预订详细
export function getBook(bookingId) {
  return request({
    url: '/booking/book/' + bookingId,
    method: 'get'
  })
}

// 新增酒店预订
export function addBook(data) {
  return request({
    url: '/booking/book',
    method: 'post',
    data: data
  })
}

// 修改酒店预订
export function updateBook(data) {
  return request({
    url: '/booking/book',
    method: 'put',
    data: data
  })
}

// 删除酒店预订
export function delBook(bookingId) {
  return request({
    url: '/booking/book/' + bookingId,
    method: 'delete'
  })
}
